<template>
  <div style="text-align: center; margin: 20px">
    <el-pagination
      background
      layout="total, prev, pager, next, jumper"
      :total="total"
      :page-size="pageSize"
      :current-page="currentPage"
      @current-change="handleCurrentChange"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // currentPage:1, 
    };
  },
  props: {
    total: {
      type: Number,
      default: 100,
    },
    pageSize: {
      type: Number,
      default: 10,
    },
    currentPage: {
      type: Number,
      default: 1,
    },
  },
  methods: {
    handleCurrentChange(page) {
      this.$emit("handleCurrentChange", page);
      console.log('------触发了分页的事件handleCurrentChange',page);
      
    },
  },
};
</script>

<style lang="less" scoped>
</style>